﻿#ifndef __GUIDEDMISSILE_H__
#define __GUIDEDMISSILE_H__
#include"Bullet.h"
#include<QVector2D>
class QLabel;
//导弹
class GuidedMissile :public Bullet
{
public:
    GuidedMissile() = default;
    GuidedMissile(int x, int y, QObject* parent);
    GuidedMissile(QPoint point, QObject* parent);
    ~GuidedMissile();
    void init();
    virtual void update()override;
    virtual void draw(QPainter* painter)override;
    //自动移动
    //void AutoMove();
    //设置自动移动属性,方向和步长(一秒距离),
    //void setProperty(const QVector2D& vector = QVector2D(0, 1), const int Steplength = 500);
    //碰撞器检查
    virtual bool Collider(const QRect& collider);
protected:
    //int m_Steplength = 30;//步长
    //QVector2D m_vector;//方向向量
private:
    QLabel* m_label = nullptr;
    QMovie* m_movie = nullptr;
    bool start = false;//播放动画开关
    QSize m_BlastSize=QSize(600,600);//爆炸大小
    //QPoint m_BlastPos;//爆炸的点
    /*bool m_destroy = false;*/
};
#endif // !__BULLET_H__